3.3.34 \(\int \frac {1}{\sqrt {\cos (c+d x)} \sqrt {1+\cos (c+d x)}} \, dx\) [234]

Optimal. Leaf size=27 \[ \frac {\sqrt {2} \text {ArcSin}\left (\frac {\sin (c+d x)}{1+\cos (c+d x)}\right )}{d} \]

[Out]

arcsin(sin(d*x+c)/(1+cos(d*x+c)))*2^(1/2)/d

________________________________________________________________________________________

Rubi [A]
time = 0.03, antiderivative size = 27, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.087, Rules used = {2860, 222} \begin {gather*} \frac {\sqrt {2} \text {ArcSin}\left (\frac {\sin (c+d x)}{\cos (c+d x)+1}\right )}{d} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[1/(Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]),x]

[Out]

(Sqrt[2]*ArcSin[Sin[c + d*x]/(1 + Cos[c + d*x])])/d

Rule 222

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Simp[ArcSin[Rt[-b, 2]*(x/Sqrt[a])]/Rt[-b, 2], x] /; FreeQ[{a, b}
, x] && GtQ[a, 0] && NegQ[b]

Rule 2860

Int[1/(Sqrt[(d_.)*sin[(e_.) + (f_.)*(x_)]]*Sqrt[(a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]]), x_Symbol] :> Dist[-Sqr
t[2]/(Sqrt[a]*f), Subst[Int[1/Sqrt[1 - x^2], x], x, b*(Cos[e + f*x]/(a + b*Sin[e + f*x]))], x] /; FreeQ[{a, b,
 d, e, f}, x] && EqQ[a^2 - b^2, 0] && EqQ[d, a/b] && GtQ[a, 0]

Rubi steps

\begin {align*} \int \frac {1}{\sqrt {\cos (c+d x)} \sqrt {1+\cos (c+d x)}} \, dx &=-\frac {\sqrt {2} \text {Subst}\left (\int \frac {1}{\sqrt {1-x^2}} \, dx,x,-\frac {\sin (c+d x)}{1+\cos (c+d x)}\right )}{d}\\ &=\frac {\sqrt {2} \sin ^{-1}\left (\frac {\sin (c+d x)}{1+\cos (c+d x)}\right )}{d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.05, size = 49, normalized size = 1.81 \begin {gather*} \frac {2 \text {ArcTan}\left (\frac {\sin \left (\frac {1}{2} (c+d x)\right )}{\sqrt {\cos (c+d x)}}\right ) \cos \left (\frac {1}{2} (c+d x)\right )}{d \sqrt {1+\cos (c+d x)}} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[1/(Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]),x]

[Out]

(2*ArcTan[Sin[(c + d*x)/2]/Sqrt[Cos[c + d*x]]]*Cos[(c + d*x)/2])/(d*Sqrt[1 + Cos[c + d*x]])

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(62\) vs. \(2(25)=50\).
time = 0.11, size = 63, normalized size = 2.33

method result size
default \(-\frac {\sqrt {\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sqrt {2+2 \cos \left (d x +c \right )}\, \arcsin \left (\frac {-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}\right )}{d \sqrt {\cos \left (d x +c \right )}}\) \(63\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/cos(d*x+c)^(1/2)/(1+cos(d*x+c))^(1/2),x,method=_RETURNVERBOSE)

[Out]

-1/d/cos(d*x+c)^(1/2)*(cos(d*x+c)/(1+cos(d*x+c)))^(1/2)*(2+2*cos(d*x+c))^(1/2)*arcsin((-1+cos(d*x+c))/sin(d*x+
c))

________________________________________________________________________________________

Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: RuntimeError} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/cos(d*x+c)^(1/2)/(1+cos(d*x+c))^(1/2),x, algorithm="maxima")

[Out]

Exception raised: RuntimeError >> ECL says: Error executing code in Maxima: sign: argument cannot be imaginary
; found %i

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 54 vs. \(2 (25) = 50\).
time = 0.42, size = 54, normalized size = 2.00 \begin {gather*} \frac {\sqrt {2} \arctan \left (\frac {\sqrt {2} \sqrt {\cos \left (d x + c\right ) + 1} \sqrt {\cos \left (d x + c\right )} \sin \left (d x + c\right )}{2 \, {\left (\cos \left (d x + c\right )^{2} + \cos \left (d x + c\right )\right )}}\right )}{d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/cos(d*x+c)^(1/2)/(1+cos(d*x+c))^(1/2),x, algorithm="fricas")

[Out]

sqrt(2)*arctan(1/2*sqrt(2)*sqrt(cos(d*x + c) + 1)*sqrt(cos(d*x + c))*sin(d*x + c)/(cos(d*x + c)^2 + cos(d*x +
c)))/d

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {1}{\sqrt {\cos {\left (c + d x \right )} + 1} \sqrt {\cos {\left (c + d x \right )}}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/cos(d*x+c)**(1/2)/(1+cos(d*x+c))**(1/2),x)

[Out]

Integral(1/(sqrt(cos(c + d*x) + 1)*sqrt(cos(c + d*x))), x)

________________________________________________________________________________________

Giac [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/cos(d*x+c)^(1/2)/(1+cos(d*x+c))^(1/2),x, algorithm="giac")

[Out]

Timed out

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.04 \begin {gather*} \int \frac {1}{\sqrt {\cos \left (c+d\,x\right )}\,\sqrt {\cos \left (c+d\,x\right )+1}} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(cos(c + d*x)^(1/2)*(cos(c + d*x) + 1)^(1/2)),x)

[Out]

int(1/(cos(c + d*x)^(1/2)*(cos(c + d*x) + 1)^(1/2)), x)

________________________________________________________________________________________